package com.jakewharton.rxbinding4.component;

import static com.jakewharton.rxbinding4.internal.Preconditions.checkNotNull;

import com.jakewharton.rxbinding4.InitialValueObservable;

import io.reactivex.rxjava3.annotations.CheckReturnValue;
import io.reactivex.rxjava3.annotations.NonNull;
import io.reactivex.rxjava3.functions.Consumer;
import ohos.agp.components.IndexBar;

public final class RxIndexBar {
    @CheckReturnValue
    @NonNull
    public static InitialValueObservable<Integer> selectedCallback(@NonNull IndexBar view) {
        checkNotNull(view, "view == null");
        return new IndexBarSelectedCallbackObservable(view);
    }

    @CheckReturnValue
    @NonNull
    public static Consumer<? super Integer> selectedCount(@NonNull IndexBar view) {
        checkNotNull(view, "view == null");
        return view::setSelectedCount;
    }

    private RxIndexBar() {
        throw new AssertionError("No instances.");
    }
}
